package com.zgjkhis.modules.statistics.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;

/**
 * 运营数据：药房药品请求
 * @Author yxl
 * @Description
 * @Date 2021/12/23 18:12
 **/
@Data
@ApiModel("药房药品请求")
public class StoreDrugRequest {

    @ApiModelProperty("药房id")
    private String pharmacyId;

    @ApiModelProperty(value = "药品名称")
    private String drugName;

    @ApiModelProperty(value = "开始时间", required = true)
    @NotBlank(message = "开始时间不能为空")
    private String startTime;

    @ApiModelProperty(value = "结束时间", required = true)
    @NotBlank(message = "结束时间不能为空")
    private String endTime;

    @ApiModelProperty(value = "药品分类1:中药饮片，2：配方颗粒，3：中成药，4：西药，5：耗材，6敷贴粉剂")
    private Integer drugType;

    @ApiModelProperty(value = "页码(0..N)")
    private int page;

    @ApiModelProperty(value = "每页显示的数目(默认为10)")
    private int size;

    @ApiModelProperty(value = "调取方式：0-实时记录,1-归档记录")
    private int type;

    public int getOffset() {
        return this.page * this.getSize();
    }

}
